package cn.javass.dp.iterator.example2;

import java.util.ArrayList;
import java.util.List;

public class PayManager {
    private List list = new ArrayList();

    public PayManager(List list) {
        this.list = list;
    }

    public void calcPay() {
        PayModel pm1 = new PayModel();
        pm1.setPay(1000);
        pm1.setUserName("张三");
        PayModel pm2 = new PayModel();
        pm2.setPay(2000);
        pm2.setUserName("李四");
        list.add(pm1);
        list.add(pm2);
    }
}
